package Problem1;

public class Main {

	public static void main(String[] args) {
		
		int answer = 0;
		for (int i = 0; i < 1000; i++) {
			if ((i % 5 == 0) || (i % 3 == 0)){
				answer += i;
			}
		}
		System.out.println(answer);

	}
	
}
